#ifndef SDL_H_INCLUDED
#define SDL_H_INCLUDED

#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_image.h>
#include <stdlib.h>

typedef enum {solid, shaded, blended} textquality;

#ifdef PSP
//Botones PSP
#define BUTTON_UP 8
#define BUTTON_DOWN 6
#define BUTTON_LEFT 7
#define BUTTON_RIGHT 9
#define BUTTON_START 11
#define BUTTON_SELECT 10
#define BUTTON_X 2
#define BUTTON_O 1
#define BUTTON_T 0
#define BUTTON_S 3
#define BUTTON_LT 4
#define BUTTON_RT 5

/*#define BUTTON_UP SDLK_UP
#define BUTTON_DOWN SDLK_DOWN
#define BUTTON_LEFT SDLK_LEFT
#define BUTTON_RIGHT SDLK_RIGHT
#define BUTTON_START SDLK_a
#define BUTTON_SELECT SDLK_s
#define BUTTON_X SDLK_n
#define BUTTON_O SDLK_o
#define BUTTON_T SDLK_SPACE
#define BUTTON_S SDLK_y
#define BUTTON_LT SDLK_w
#define BUTTON_RT SDLK_r*/

#else
//Botones teclado
#define BUTTON_UP SDLK_UP
#define BUTTON_DOWN SDLK_DOWN
#define BUTTON_LEFT SDLK_LEFT
#define BUTTON_RIGHT SDLK_RIGHT
#define BUTTON_START SDLK_SPACE
#define BUTTON_SELECT SDLK_LALT
#define BUTTON_X SDLK_x
#define BUTTON_O SDLK_d
#define BUTTON_T SDLK_e
#define BUTTON_S SDLK_s
#define BUTTON_LT SDLK_w
#define BUTTON_RT SDLK_r
#endif


/*
 * Draw text to a surface
 */
SDL_Surface * sdl_draw_text(TTF_Font *, char , char , char , char , char , char , char , char, const char* , textquality );

/*
 * Load a Font
 */

TTF_Font* sdl_load_font(const char* file, int ptsize);

void sdl_clear_screen(char, char, char);

void sdl_paint_surface(SDL_Surface*, SDL_Rect*);

SDL_Surface * sdl_load_image(char*);

void sdl_flip();

int init_sdl();

#endif // SDL_H_INCLUDED
